package com.api.zszsj2.ZYT.util.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class TableHeader {
    private String title;
    private String key;
    private String dataIndex;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TableHeader> children;

    public void addChildern (TableHeader tableHeader){
        if (children == null){
            children = new ArrayList<>();
        }
        children.add(tableHeader);
    }
}
